package cn.larry.xgtg.client;

	import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.googlecode.mgwt.mvp.client.Animation;
import com.googlecode.mgwt.ui.client.MGWT;
import com.googlecode.mgwt.ui.client.MGWTSettings;
import com.googlecode.mgwt.ui.client.animation.AnimationHelper;
import com.googlecode.mgwt.ui.client.widget.Button;
import com.googlecode.mgwt.ui.client.widget.LayoutPanel;
import com.googlecode.mgwt.ui.client.widget.buttonbar.ButtonBar;
import com.googlecode.mgwt.ui.client.widget.tabbar.BookmarkTabBarButton;
import com.googlecode.mgwt.ui.client.widget.tabbar.DownloadsTabBarButton;
import com.googlecode.mgwt.ui.client.widget.tabbar.FeaturedTabBarButton;
import com.googlecode.mgwt.ui.client.widget.tabbar.HistoryTabBarButton;
import com.googlecode.mgwt.ui.client.widget.tabbar.MoreTabBarButton;
import com.googlecode.mgwt.ui.client.widget.tabbar.TabBarButtonBase;
import com.googlecode.mgwt.ui.client.widget.tabbar.TabPanel;
import com.googlecode.mgwt.ui.client.widget.tabbar.TabPanel.TabBar;

	public class MxgtgEntryPoint implements EntryPoint {

	  public void onModuleLoad() {
	    // set viewport and other settings for mobile
	    MGWT.applySettings(MGWTSettings.getAppSetting());
	    int hight=Window.getClientHeight();
	    int width=Window.getClientWidth();
	    int width_button=width/5 -20;
	    //Window.alert(hight+":"+width);
	    // build animation helper and attach it
	    AnimationHelper animationHelper = new AnimationHelper();
	    RootPanel.get().add(animationHelper);

	    
	    // build some UI
	    LayoutPanel layoutPanel = new LayoutPanel();
	    
	    TabPanel tb=new TabPanel();
	    
	    tb.add(new BookmarkTabBarButton(),new Label("首页"));
	    tb.add(new HistoryTabBarButton(),new Label("优化"));
	    tb.add(new DownloadsTabBarButton(),new Label("商桥"));
	    tb.add(new FeaturedTabBarButton(),new Label("消息"));
	    tb.add(new MoreTabBarButton(),new Label("更多"));
 
	    layoutPanel.add(tb);
	    
	    
	    // animate
	    animationHelper.goTo(layoutPanel, Animation.SLIDE);

	  }

}
